<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> 

<script>

function _submit(){
	if($("#new_password").val() != $("#new_password2").val()){
		showMessage("請再確認密碼",2);
		$("#new_password").val("").css({border:"3px dotted #FF0000"});
		$("#new_password2").val("").css({border:"3px dotted #FF0000"});
		return;
	}
	
	
	$.post("${appPath}/option/private/password.htm",$('#UsersForm').serialize(),function(data){
		if(data == 0){
			showMessage("密碼修改成功",1);
			$("#password").css({border:"1px solid #BDC7D8"});
		}else if(data == 1){
			showMessage("舊密碼輸入錯誤",2);
			$("#password").css({border:"3px dotted #FF0000"});
		}else if(data == 2){
			showMessage("系統錯誤",2);
		}		
		$("#password").val("");
		$("#new_password").val("").css({border:"1px solid #BDC7D8"});
		$("#new_password2").val("").css({border:"1px solid #BDC7D8"});
		$("#AREA_CONFIRM").slideUp("fast");
	});
}

function examine(){	
	
	
	var password = $("#password").val().length;
	var new_password = $("#new_password").val().length;
	var new_password2 = $("#new_password2").val().length;
	
	if(password > 0 && new_password > 0 && new_password2 > 0){
		$("#AREA_CONFIRM").slideDown("fast");
	}else if (password == 0 || new_password == 0 || new_password2 == 0){
		$("#AREA_CONFIRM").slideUp("fast");
	}
}

</script>

<div id="page">
	<div id="page-bgtop">
		<div id="page-bgbtm">
			<div id="content">
				<div class="post">
				<%-- 
					<h2 class="title inner">密碼設定</h2>
					
					<div style="clear: both;">&nbsp;</div>
				--%>
					<div class="entry">
						<%@ include file="form.jsp" %>		
					</div>
				</div>
				<div style="clear: both;">&nbsp;</div>
			</div>
			<!-- end #content -->
			
			<%@ include file="/WEB-INF/jsp/common/submenu09.jsp" %>			
			<div style="clear: both;">&nbsp;</div>
		</div>
	</div>
</div>
<!-- end #page -->